<div class="row-fluid">
	<?php $data = $this->data;?>
	<div class="span6 well">
		<?php
			echo $this->Form->create('User',array(
				'url' => array('controller' => 'users','action' => 'profile'),
				'class' => 'form-horizontal',
				'inputDefaults' => array('label' => false,'div' => 'controls')
			));
		?>
			<fieldset>
				<legend>Update Personal Information</legend>
				<div class='control-group'>
					<label class='control-label' for='username'><strong>Username</strong></label>
					<?php echo $this->Form->input('username',array(
							'id' => 'username', 
							'class' => 'input-medium',
							'default' => $user['User']['username'],
							'disabled' => 'disabled'
					))?>
				</div>
				<div class='control-group'>	
					<label class='control-label' for='name'><strong>Name</strong></label>
					<?php echo $this->Form->input('name',array(
							'id' => 'name', 
							'class' => 'input-medium',
							'default' => !empty($data['User']) ? $data['User']['name'] : $user['User']['name'],
					))?>
				</div>
				<div class='control-group'>	
					<label class='control-label' for='email'><strong>Email</strong></label>
					<?php echo $this->Form->input('email',array(
							'id' => 'email', 
							'class' => 'input-medium',
							'default' => !empty($data['User']) ? $data['User']['email'] : $user['User']['email'],
					))?>
				</div>
				<div class='control-group'>	
					<label class='control-label' for='address'><strong>Address</strong></label>
					<?php echo $this->Form->input('address',array(
							'type' => 'text',
							'id' => 'address', 
							'class' => 'input-xlarge',
							'default' => !empty($data['User']) ? $data['User']['address'] : $user['User']['address'],
					))?>
				</div>
				
				<div class="form-actions">
		            <button class="btn btn-primary" type="submit">Update</button>
		            <button class="btn" type="reset">Reset</button>
				</div>
			</fieldset>
		<?php echo $this->Form->end();?>
	</div>
	<div class="span6 well">
		<?php
			echo $this->Form->create('ChangePwd',array(
				'url' => array('controller' => 'users','action' => 'profile'),
				'class' => 'form-horizontal',
				'inputDefaults' => array('label' => false,'div' => 'controls')
			))
		?>
			<fieldset>
				<legend>Change Password</legend>
				<div class='control-group'>
					<label class='control-label' for='oldPwd'><strong>Current Password</strong></label>
					<?php echo $this->Form->input('oldPwd',array(
							'id' => 'oldPwd', 
							'class' => 'input-medium',
							'type' => 'password',
					))?>
				</div>
				<div class='control-group'>	
					<label class='control-label' for='pwd'><strong>New Password</strong></label>
					<?php echo $this->Form->input('pwd',array(
							'id' => 'pwd', 
							'class' => 'input-medium',
							'type' => 'password',
					))?>
				</div>
				<div class='control-group'>	
					<label class='control-label' for='confirmPwd'><strong>Confirm Password</strong></label>
					<?php echo $this->Form->input('confirmPwd',array(
							'id' => 'confirmPwd', 
							'class' => 'input-medium',
							'type' => 'password',
					))?>
				</div>
				
				<div class="form-actions">
		            <button class="btn btn-primary" type="submit">Change Password</button>
		            <button class="btn" type="reset">Reset</button>
				</div>
			</fieldset>
		<?php echo $this->Form->end();?>
	</div>
</div>